package com.common.baseconstant;

import jdk.nashorn.internal.runtime.regexp.joni.Matcher;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;


/**
 * function
 * Created by Administrator on 2016/12/1.
 */
public class MapBuilder<K,V> {

    protected Map<K,V> map ;

    public MapBuilder(int size){this.map = new LinkedHashMap<K, V>(size);}

    public MapBuilder(Map<K,V> map ){this.map = map;}

    public MapBuilder<K,V> put(K k,V v){
        this.map.put(k,v);
        return this;
    }
    public MapBuilder<K,V> putAll(Map<? extends  K,? extends V> mapBuilder){
        this.map.putAll(mapBuilder);
        return this;
    }

    public Map<K, V> getMap() {
        return map;
    }

    public void setMap(Map<K, V> map) {
        this.map = map;
    }
}
